# -*- coding: UTF-8 -*-

import subprocess

proc = subprocess.Popen([r"C:\Program Files (x86)\Notepad++\notepad++.exe", "test.txt"])
outs, errs = proc.communicate()
while True:
    if proc.poll() is not None:
        break
